import http from '../utils/httpRequest'
export default {

  getUploadingFilePolicy(){
    return  http({
      url:`${window.SITE_CONFIG.baseUrl}/mall/ali/oss/getPolicyOfUploadingFile`,
      method:'get'
    })
  },

  deleteFile(objectURL){
    return http({
      url:`${window.SITE_CONFIG.baseUrl}/mall/ali/oss/deleteFileByObjectURL`,
      method:'post',
      data:objectURL
    });
  },

  /**
   * 调用服务删除数据库中的图片和阿里云Oss中的图片
   * */
  deleteFileOfDbAndOss(brandId,objectURL){
    return http({
      url:`${window.SITE_CONFIG.baseUrl}/pms/brand/deleteLogoOfDbAndAliOss/${brandId}`,
      method:'post',
      data:objectURL
    });
  },


  getHostAddress(){
    return http({
      url:`${window.SITE_CONFIG.baseUrl}/mall/ali/oss/getOssHost`,
      method:'get'
    });
  }


}
